package com.zpark.drug.pojo;

import com.zpark.drug.common.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 客户信息
 */

@Table(name = "customer")
public class Customer {
    @Id
    @Column(name = "customer_id")
    private Integer id;
    @Column(name = "customer_name")
    private String name;
    @Column(name = "customer_information")
    private String information;
    @Column(name = "customer_address")
    private String address;
    @Column(name = "customer_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date time;
    public String getTimeStr(){
        return DateUtil.dateConvert(time);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInformation() {
        return information;
    }

    public void setInformation(String information) {
        this.information = information;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }
}
